﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using V2.PaidTimeOffBLL.Framework.Reports;

public partial class Reports_ReportViewer3Layer : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ReportDocument report = new ReportDocument();
        report.Load(Server.MapPath("Roles3Layer.rpt"));
                
        //Get the data                
        report.SetDataSource(ReportENTRole.SelectCapabilities());

        report.Subreports[0].SetDataSource(ReportENTRole.SelectUserAccounts());

        report.ExportToHttpResponse(ExportFormatType.WordForWindows, Response, false, "");
                
    }
}
